package com.ss.test07;

import java.util.HashSet;
import java.util.LinkedHashSet;

/**
 * @Auther: 520ljs
 * @Date: 2022/3/17 - 03 - 17 - 14:34
 */
public class TestStudent {
    //这是一个main方法，是程序的入口
    public static void main(String[] args) {
        //创建一个HashSet集合：
        /*HashSet<Student> hs = new HashSet<>();*/
        LinkedHashSet<Student> hs = new LinkedHashSet<>();
        hs.add(new Student(19,"lili"));
        hs.add(new Student(20,"lulu"));
        hs.add(new Student(18,"feifei"));
        hs.add(new Student(19,"lili"));
        hs.add(new Student(10,"nana"));
        System.out.println(hs.size());
        System.out.println(hs);
    }
}
